<?php
	if (@$_SESSION['status'] == 'loggedId') {
		$showLoginDialog = false;
	} else{
		$showLoginDialog = true;
	}

	$this->exchange->oHeader->addCssFile('frontend/style/headerData.css');

	$registry = Yapary_SingletonRegistry::getInstance();
	/* @var $oXmlTranslator Yapary_Translation_XmlTranslator */
	$oXmlTranslator = $registry->oXmlTranslator;
	// Usermanager
	$oManager = new UserManager();

?>

<div id="logo">
	PD<span>F</span><br>&nbsp;&nbsp;<span>S</span>HOP
</div>

	<?php
	echo '<div id="navbar">';
	$registry = Yapary_SingletonRegistry::getInstance();
	$oMainMenu2		= new Yapary_Menu_XmlMenu(file_get_contents(FRONTEND_ROOT.'data/main_menu_'.COUNTRY_CODE.'.xml'), '');
	if($oManager->isLoggedIn(@$_SESSION['username']) !== true) {
		$oMainMenu2->delete('ACCOUNT_INDEX');
	}
	$oMainMenu2->setSelected(strtoupper(Yapary_SingletonRegistry::getInstance()->routeName));

	echo $oMainMenu2->display();
	echo '</div>';
	//echo var_dump($oManager->isLoggedIn(@$_SESSION['username']));
	if($oManager->isLoggedIn(@$_SESSION['username']) === true) {
		echo $this->partial->insert('logoutDialog.phtml');
	} else {
		echo $this->partial->insert('loginDialog.phtml');
	}
?>